<template>
    <div class="form-static">
        <el-row type="flex">
            <el-col :span="3" align="right">用户名：</el-col>
            <el-col :span="9" v-text="userInfo.username"></el-col>
            <el-col :span="3" align="right">编码：</el-col>
            <el-col :span="9" v-text="userInfo.code"></el-col>
        </el-row>
        <el-row type="flex">
            <el-col :span="3" align="right">手机：</el-col>
            <el-col :span="9" v-text="userInfo.mobile"></el-col>
            <el-col :span="3" align="right">邮箱：</el-col>
            <el-col :span="9" v-text="userInfo.email"></el-col>
        </el-row>
        <el-row type="flex">
            <el-col :span="3" align="right">类型：</el-col>
            <el-col :span="9">{{userInfo.type | dict('USER_TYPE', $store.state.dict.list)}}</el-col>
            <el-col :span="3" align="right">状态：</el-col>
            <el-col :span="9">{{userInfo.status | dict('USER_STATUS', $store.state.dict.list)}}</el-col>
        </el-row>
        <el-row type="flex">
            <el-col :span="3" align="right">值：</el-col>
            <el-col :span="9" v-text="userInfo.val"></el-col>
            <el-col :span="3" align="right">最后登录时间：</el-col>
            <el-col :span="9">{{userInfo.lastLoginTime | datetime}}</el-col>
        </el-row>
        <el-row type="flex">
            <el-col :span="3" align="right">登录ip：</el-col>
            <el-col :span="9" v-text="userInfo.lastLoginIp"></el-col>
            <el-col :span="3" align="right">登录失败次数：</el-col>
            <el-col :span="9" v-text="userInfo.loginFailureCount"></el-col>
        </el-row>
        <el-row type="flex">
            <el-col :span="3" align="right">当日密码修改次数：</el-col>
            <el-col :span="9" v-text="userInfo.pwdModifyTimesToday"></el-col>
            <el-col :span="3" align="right">密码最后修改时间：</el-col>
            <el-col :span="9">{{userInfo.pwdModifyLastTime | datetime}}</el-col>
        </el-row>
        <el-row type="flex">
            <el-col :span="3" align="right">是否在线：</el-col>
            <el-col :span="9" v-text="userInfo.online"></el-col>
            <el-col :span="3" align="right">修改次数：</el-col>
            <el-col :span="9" v-text="userInfo.ve"></el-col>
        </el-row>
        <el-row type="flex">
            <el-col :span="3" align="right">创建人：</el-col>
            <el-col :span="9" v-text="userInfo.cu"></el-col>
            <el-col :span="3" align="right">创建时间：</el-col>
            <el-col :span="9">{{userInfo.cd | datetime}}</el-col>
        </el-row>
        <el-row type="flex">
            <el-col :span="3" align="right">修改人：</el-col>
            <el-col :span="9" v-text="userInfo.lmu"></el-col>
            <el-col :span="3" align="right">修改时间：</el-col>
            <el-col :span="9">{{userInfo.lmd | datetime}}</el-col>
        </el-row>
    </div>
</template>
<script>
    import axios from '~plugins/axios';

    export default {
        data() {
            return {
                userInfo: {}
            };
        },
        mounted() {
            axios.get(`/api/user/${this.$route.query.id}`).then(res => {
                this.userInfo = res.data;
            });
        }
    };
</script>